class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string :sid, :null => false, :limit => 10
      t.string :name, :null => false, :limit => 25
      t.string :type, :null => false, :limit => 10
      t.string :sex,:limit => 4
      t.date :birthday
      t.string :password,:null => false, :limit => 50
      t.string :email, :limit => 50
      t.string :phone, :limit => 25
      t.string :mobile, :limit => 25
      t.string :im, :limit => 25
      t.string :school, :limit => 50
      t.date :enrolldate
      t.string :level,:limit => 50#入学程度 or 专业程度
      t.string :specialty, :limit => 25 #教师教学/学员学习意向专业
      t.text :experience #培训经历
      t.text :suggestion #中心意见
      t.text :objection #家长意见
      t.integer :teacher_id
      t.decimal :base
      t.timestamps
    end
  end

  def self.down
    drop_table :users
  end
end
